<template>
    <div style="text-align: center;">
        <Row v-for="(item, index) in list">
            <Col span="24">
                <span>{{item.title}}</span><span>{{item.formated_create_time}}</span>
                <Button v-on:click="handleEdit(item, index)">编辑</Button>
            </Col>
        </Row>
        <AutoPage v-model="page"></AutoPage>
    </div>
</template>

<script>
import Page from '@/common/model/Page'
import AutoPage from '@/common/components/AutoPage'
import Investment from '@/common/model/Investment'

export default {
    data(){
        return {
            page: new Page("investment/page")
        };
    },
    computed: {
        list() {
            return Investment.parseList(this.page.list);
        }
    },
    components: {
        AutoPage
    },
    methods: {
        handleEdit(item, index) {
            this.$router.push({
                name: 'post_investment_project', query: {id: item.id}
            });
        }
    },
    created() {
    }
};
</script>